package io.renren.modules.mvs.service;

import com.baomidou.mybatisplus.extension.service.IService;
import io.renren.common.utils.PageUtils;
import io.renren.modules.mvs.dto.TicketDto;
import io.renren.modules.mvs.entity.TicketEntity;

import java.math.BigDecimal;
import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * 罚单表
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2025-03-30 17:08:24
 */
public interface TicketService extends IService<TicketEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 获取罚单信息及相应违章信息的集合
     */
    List<TicketDto> getTicketDtoList();

    /**
     * 用户对罚单进行缴费
     * @param payMoney 缴费金额
     * @param ticketId 罚单编号
     * @param userId 用户id
     * @return 剩余金额
     */
    BigDecimal payment(BigDecimal payMoney, String ticketId, Long userId);

    Map<String, Collection<?>> getFineListByDateRange(String startDate, String endDate);

    Map<String, Collection<?>> getMoneyListByDateRange(String startDate, String endDate);

    TicketEntity getByWaitPayment(String id);
}

